Skip to content

test: add unit tests for stas module utility functions#478

Merged
martin-belanger merged 1 commit intolinux-nvme:mainfrom
martin-belanger:add-more-coverage
Apr 6, 2026
Merged

test: add unit tests for stas module utility functions#478
martin-belanger merged 1 commit intolinux-nvme:mainfrom
martin-belanger:add-more-coverage

Conversation

@martin-belanger
Copy link
Copy Markdown
Collaborator

Add test-stas.py covering four untested functions in staslib/stas.py: _excluded(), tid_from_dlpe(), remove_excluded(), and remove_invalid_addresses(). These are pure or near-pure functions that do not require GLib or D-Bus, making them straightforward to test. Also register the new test in test/meson.build.

Add test-stas.py covering four untested functions in staslib/stas.py:
_excluded(), tid_from_dlpe(), remove_excluded(), and
remove_invalid_addresses(). These are pure or near-pure functions that
do not require GLib or D-Bus, making them straightforward to test.
Also register the new test in test/meson.build.

Signed-off-by: Martin Belanger <[email protected]>
@martin-belanger martin-belanger merged commit 70bfcbf into linux-nvme:main Apr 6, 2026
9 checks passed
@martin-belanger martin-belanger deleted the add-more-coverage branch April 6, 2026 19:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.34%. Comparing base (4e91aad) to head (dfffd06).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
+ Coverage   58.72%   59.34%   +0.61%     
==========================================
  Files          16       16              
  Lines        2612     2612              
==========================================
+ Hits         1534     1550      +16     
+ Misses       1078     1062      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant